package temp;

/**
 * @author oldliu
 * @since 1.0
 */
public class Zhaoweizhi {
    public static void main(String[] args) {
        int a[]={113,6,71,66,70,67,234,270,677};
        for (int i = 0; i < a.length; i++) {
            //a[i],0----i-1,i+1  a.length-1
            //1:0---i-1位置上的值都比 a[i]小或者等于
            int j = 0;
            for (; j <=i-1; j++) {
                if(a[j]>a[i]){
                    break;
                }
            }
            if(j<i){
                continue;
            }
            for(j=i+1;j<a.length;j++){
                if(a[j]<a[i]){
                    break;
                }
            }
            if(j<a.length){
                continue;
            }
            //
            System.out.println(a[i]);
            return;
        }
        System.out.println("没有合适的");
    }
}
